package DB.Dao.MaterialUsing;

/**
 * MaterialUsingId entity. @author MyEclipse Persistence Tools
 */

public class MaterialUsingId implements java.io.Serializable {

	// Fields

	private Integer repairWorkId;
	private Integer materialId;
	private Integer num;

	// Constructors

	/** default constructor */
	public MaterialUsingId() {
	}

	/** full constructor */
	public MaterialUsingId(Integer repairWorkId, Integer materialId, Integer num) {
		this.repairWorkId = repairWorkId;
		this.materialId = materialId;
		this.num = num;
	}

	// Property accessors

	public Integer getRepairWorkId() {
		return this.repairWorkId;
	}

	public void setRepairWorkId(Integer repairWorkId) {
		this.repairWorkId = repairWorkId;
	}

	public Integer getMaterialId() {
		return this.materialId;
	}

	public void setMaterialId(Integer materialId) {
		this.materialId = materialId;
	}

	public Integer getNum() {
		return this.num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof MaterialUsingId))
			return false;
		MaterialUsingId castOther = (MaterialUsingId) other;

		return ((this.getRepairWorkId() == castOther.getRepairWorkId()) || (this
				.getRepairWorkId() != null
				&& castOther.getRepairWorkId() != null && this
				.getRepairWorkId().equals(castOther.getRepairWorkId())))
				&& ((this.getMaterialId() == castOther.getMaterialId()) || (this
						.getMaterialId() != null
						&& castOther.getMaterialId() != null && this
						.getMaterialId().equals(castOther.getMaterialId())))
				&& ((this.getNum() == castOther.getNum()) || (this.getNum() != null
						&& castOther.getNum() != null && this.getNum().equals(
						castOther.getNum())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getRepairWorkId() == null ? 0 : this.getRepairWorkId()
						.hashCode());
		result = 37
				* result
				+ (getMaterialId() == null ? 0 : this.getMaterialId()
						.hashCode());
		result = 37 * result
				+ (getNum() == null ? 0 : this.getNum().hashCode());
		return result;
	}

}